package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.NursingProjectDto;
import com.zzyl.entity.NursingProject;
import com.zzyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface NursingProjectMapper {
    //TODO
    Page<NursingProjectVo> queryPage(@Param("name")String name, @Param("status") Integer status);

    @Insert("insert into nursing_project(name,order_no,unit,price,image,nursing_requirement,status,create_by,update_by,remark,create_time,update_time)" +
            "values (#{name},#{orderNo},#{unit},#{price},#{image},#{nursingRequirement},#{status},#{createBy},#{updateBy},#{remark},#{createTime},#{updateTime})")
    void addNursing(NursingProject nursingProject);


    void deleteNursing(Integer id);

    NursingProjectVo getById(Integer id);

    void updateNursing(NursingProject nursingProject);

    @Select("select * from nursing_project")
    List<NursingProjectVo> getAll();
}
